﻿using System;
using System.Web.UI.WebControls;
using Ue.Infrastructure.DomainBase;
using Ue.Infrastructure.Web.UI;
using Ue.Qcdz.Domain.TheResource;

namespace Ue.Qcdz.UI.Controls.TheResource
{
    public class ResourceView : SkinnedGridView
    {
        private string sinkName = "~/Admin/Themes/Skins/Resources/ResourceView.ascx";

        #region Overrides of SkinnedControl

        protected override string GetSkinFileName()
        {
            return sinkName;
        }

        #endregion

        #region Overrides of SkinnedGridView

        protected override void GridViewDataBind(object sender, EventArgs args)
        {
            //IDataResult<Resource> dataResult = ResourceService.GetResource(this);
            //Repeater repeater = sender as Repeater;
            //repeater.DataSource = dataResult.DataObjects;
            //repeater.DataBind();
            //this.RecordCount = dataResult.RecordCount;
            Repeater repeater = sender as Repeater;
            repeater.DataSource = ResourceService.GetResource();
            repeater.DataBind();
        }

        #endregion
    }
}
